<template>
	<view class="container flex-column flex-center">
		<view class="success-img">
			<image src="../../../../static/icon/bindresult.png" class="my-img"></image>
		</view>
		<view v-show="info.id == flags.createWorkOrderFlags" class="content flex-column flex-center">
			<view class="text">
				<text>创建工单成功</text>
			</view>
			<view class="text font-color-888">此工单已与工程师{{info.name}} 绑定</view>
			<button type="primary" class="submit-button" @click="on">确定</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
				
				info: {
					id: 3,
					name: '王超',
					equipment_id:''
				},
				flags: {
					//创建工单成功的参数
					createWorkOrderFlags: 3,
					// //创建喷码机成功的参数
					// createEquepmentFlags: 2,
					// //转交任务成功的标志
					// transferTaskFlags: 3,
					// //工单列表中创建成功标志
					// listCreateWorkOrderFlags: 4

				},
			}
		},
		methods: {
			on() {
			
			 uni.reLaunch({
				url: '/pages/views/engineer/WorkOrderRecord/WorkOrderRecord?id='+this.info.equipment_id,
			 }); 
			}
		},
		onShow() {
			/**
			 * 检验当前是否已经登录
			 */
			let curRoute = this.$mp.page.route;
			this.$intercept.permission(curRoute)
		},
		onLoad(op) {
			op.id = parseInt(op.id)
			this.info = op
			console.log("成功页面")
			console.log(op)
			console.log(this.info)
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100%;
		height: 100%;

		.success-img {
			width: 218rpx;
			height: 218rpx;
		}

		.content {
			width: 100%;

			.text {
				margin-top: 40rpx;

			}

			.submit-button {
				margin-top: 40rpx;
				border-radius: 20rpx;
				width: 90%;
				background-color: #09BB07;
			}
		}


	}
</style>
